
package business.ordersubsystem;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Logger;

import middleware.exceptions.DatabaseException;
import business.SessionCache;
import business.exceptions.BackendException;
import business.externalinterfaces.CustomerConstants;
import business.externalinterfaces.CustomerProfile;
import business.externalinterfaces.CustomerSubsystem;
import business.externalinterfaces.Order;
import business.externalinterfaces.OrderItem;
import business.externalinterfaces.OrderSubsystem;
import business.externalinterfaces.ShoppingCart;
import business.shoppingcartsubsystem.ShoppingCartSubsystemFacade;

public class OrderSubsystemFacade implements OrderSubsystem {
	private static final Logger LOG = 
		Logger.getLogger(OrderSubsystemFacade.class.getPackage().getName());
    CustomerProfile custProfile;
    
    public OrderSubsystemFacade(CustomerProfile custProfile){
        this.custProfile = custProfile;
    }
  
         
        
    
	public OrderItem createOrderItem(Integer prodId,Integer orderId, String quantityReq, String totalPrice){
        return new OrderItemImpl(prodId,orderId,quantityReq,totalPrice);
    }
	
	public Order createOrder(Integer orderId, String orderDate, String totalPrice) {
		return new OrderImpl(orderId, orderDate, totalPrice);
	}

  
    ///////////// Methods internal to the Order Subsystem
    
    OrderImpl getOrderData(Integer orderId) throws DatabaseException {
    	DbClassOrder dbClass = new DbClassOrder();
    	return dbClass.getOrderData(orderId);
    }
	
    
    
 

        
 
}
